package Event.lib;

import Creature.Player;
import Event.Story;

/**
 * 吃饭的时候发现里面有个小虫子
 */

public class Foodinsert extends Story {

    int random = (int) (Math.random() * 10);

    public  Foodinsert(Player player) {
        super(player);

        eventName = "吃饭看到虫子";
        happenText = "经过一天的劳累，你打算去楼下的琉州罗师粉吃粉，刚开始吃突然发现里面有个小虫子";
        options = new String[]{"不以为意", "感到一阵惊喜", "喊老板"};
    }


    @Override
    public void eventHappen(int option) {
        player.setHungry(player.getHungry()+20);
        switch (option) {
            case 0:
                endText = "你挑出来虫子扔掉，继续吃";
                player.setHealth(player.getHealth()-5);

                break;
            case 1:
                endText = "你非常高兴并把它吃掉，免费加餐约等于赚了一个亿";
                player.setHealth(player.getHealth()-10);
                player.setSan(player.getSan() + 15);
                break;
            case 2:
                endText = "你指着这个虫子并要求老板赔偿，和老板扯了好久得到了一笔赔偿，但少吃了一顿饭";
                player.setMoney(player.getMoney() + 100);
                player.setHungry(player.getHungry() -10);
                break;
        }
    }

    @Override
    public boolean canHappen(Player player) {
        return true;
    }
}
